#pragma once

#ifndef VTTERRORMANAGER_H
#define VTTERRORMANAGER_H

#include "VTTObject.h"

#include <stack>
#include <string>

/**
  *	ErrorManager that is used for error management. Error messages are pushed
  * onto a stack by all the Classes and can than be retrieved. The
  * ErrorManager is implemented as a singleton.
  */
class VTTErrorManager : public VTTObject
{
public:
	static VTTErrorManager *Get( void );

	void flush();
	void pushErrorMessage( const std::string &errorMessage );
	std::string popErrorMessage( void );

private:
	VTTErrorManager( void );
	virtual ~VTTErrorManager( void );

	/** The ErrorManager itself */
	static VTTErrorManager *errorManager;
	/** Stack with all the error messages */
	std::stack<std::string> mErrorMessageStack;
};

#endif